package main

import (
	"flag"
	"fmt"
	"os"
	"utilsx/tools/fileUtils"
)

func main() {

	// 定义命令行参数对应的变量，这三个变量都是指针类型
	var cliName = flag.Int("p", 0, "Input Exe port")
	var cliGender = flag.String("mysql", "male", "Input Your Gender")
	var help = flag.String("h", "help", "Show Help")
	for i := 0; i != flag.NArg(); i++ {
		fmt.Printf("arg[%d]=%s\n", i, flag.Arg(i))
	}
	flag.Parse()

	fmt.Println("flagname=", *help)
	fmt.Println("flagname=", *cliGender)
	fmt.Println("flagname=", *cliName)

	getwd, err := os.Getwd()
	if err != nil {
		return
	}
	for _, info := range fileUtils.WalkFile(getwd) {
		if !info.IsDir {

			//fmt.Println(strings.TrimPrefix(info.Path, getwd))
			fmt.Println(info.Path)
		}

	}
}
